<?php namespace simpleFlow;

use simpleFlow\Object as SFObject;

/**
 * Manage system files
 * @package simpleFlow
 * @author Guilherme Fontenele
 */
class File extends SFObject
{
	/**
	 * Verifiy if file exists and if its readable
	 * @param string $strFile File name
	 * @return boolean If file exists and is readable
	 */
	public static function readable($strFile)
	{
		return self::exists($strFile) && \is_readable($strFile);
	}
	
	/**
	 * Verify if file exists and if is writable
	 * @param string $strFile File name
	 * @return boolean If file exists and is writable
	 */
	public static function writable($strFile)
	{
		return self::exists($strFile) && \is_writable($strFile);
	}
	
	/**
	 * Verify if file exists
	 * @param string $strFile File name
	 * @return boolean If file exists
	 */
	public static function exists($strFile)
	{
		return \file_exists($strFile);
	}
}

?>